<?php

namespace App\Http\Controllers\Api;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Models\Product;
use App\Http\Requests\Api\ApiRequest;

class ProductController extends Controller
{
    public function index(ApiRequest $request)
    {
    	$rs['status'] = true;
    	$list = Product::where(['on_sale'=>1])->get();
    	$rs['data'] = $list;
    	return response()->json($rs);
    }
}
